﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

namespace BS_2.VTKClass
{
    class NumTools
    {
        static String regx = "-?(0|([1-9]\\d*))\\.\\d+";
        /**
         * 实数验证
         * @param val
         * @return
         */
        public static bool isNumBer(String val)
        {
            String regx = "^((-?\\d+.?\\d*)[Ee]{1}(-?\\d+))$";//科学计数法正则表达式
            Regex rgx = new Regex(regx);
            string result = rgx.Replace(val, regx);
            return true;
            //  return pattern.matcher(val).matches();
        }
    }
}
